home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19950726-19950929
/
000115_news@columbia.edu_Wed Aug 9 15:50:18 1995.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
4KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA18867
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Wed, 9 Aug 1995 11:50:24 -0400
Received: by apakabar.cc.columbia.edu id AA05855
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Wed, 9 Aug 1995 11:50:22 -0400
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Remapping function keys?
Date: 9 Aug 1995 15:50:18 GMT
Organization: Columbia University
Lines: 64
Message-Id: <40alfq$5ms@apakabar.cc.columbia.edu>
References: <3vlgqu$chj@n.ruf.uni-freiburg.de>
Nntp-Posting-Host: watsun.cc.columbia.edu
Cc:
In article <3vlgqu$chj@n.ruf.uni-freiburg.de>,
Christoph Gartmann <gartmann@immunbio.mpg.de> wrote:
:
: Is it possible to remap the function keys to something different? The
: problem here is that my system (C-Kermit under VMS) doesn't send a
: single byte but several bytes for one function key. E.g. F10 sends
: <ESC>[21~ . And now I would like C-Kermit to transmit something
: different for F10. Is it possible? And if so, how do I do it?
:
From the Kermit FAQ (http://www.columbia.edu/kermit/faq.html):
24 HOW DO I USE 'SET KEY' WITH PC F-KEYS, ETC, IN UNIX OR VMS C-KERMIT?
C-Kermit comes in basically two varieties:
- The version for OS/2 that had direct access to the keyboard and
screen, and therefore can see keyboard scan codes and so on, and can
do true terminal emulation. Here you have comprehensive key mapping
ability.
- The versions for UNIX, VMS, and so on, that do not have direct access
to the keyboard and screen, and rely on your console driver, terminal
window, external terminal emulator (such as MS-DOS Kermit), or actual
terminal to perform the terminal functions.
UNIX is an interesting case. Traditionally, UNIX was accessed through a
terminal that was plugged into a terminal port on a timesharing system.
Thus, there is no keyboard and screen -- just a communication port. In
recent years, this type of access has been largely replaced by terminal
servers, but there is still no keyboard and screen. However, now that we
have a plethora of PC-based UNIX varieties that run on workstations (PCs)
that actually do have a keyboard and screen, it would seem to make sense
that Kermit should be able to see all the keys.
Unfortunately, this is not the case. Most varieties of UNIX do not let
the application see the keyboard. There is no kernel function called "get
keyboard scan code". There is only read(), and read() reads a character,
not a multibyte scan code. Thus, even if your console driver has
programmed (say) your F1 key to send (say) ESC O P, Kermit will read three
characters in succession, as if they were three keystrokes, not one. It
has no way of knowing that you pressed the F1 key. As far Kermit knows,
you pressed the Esc key, then the O key, then the P key.
Now perhaps Linux *does* have a system call to let an application at the
keyboard. But...
- In what contexts does it work? Only on the raw console? In an xterm
window? etc etc.
- Does it require special privilege to execute?
- What about all the other versions of UNIX that run on PCs -- FreeBSD,
SCO, Solaris/Intel, etc etc?
- What about all the other versions of UNIX that run on non-PC
workstations -- SunOS, Solaris/Sparc, HP-UX, AIX, SGI, etc?
So the answer is, for now at least -- and as the documentation states --
C-Kermit's SET KEY command in UNIX (and VMS, AOS/VS, VOS, etc) works only
for keys that generate a single 8-bit value, 0..255. Other types of
mappings will have to be accomplished outside of Kermit by configuring
your console driver, your xterm (e.g. with Xmodmap), and so on.
- Frank